# bb_setup.py
from bbfreeze import Freezer
import os
import shutil

listOfFilesAndDirectories = ['AboutDocs', 'LatinEngines', 'XMLDocs', 'SoundFiles', 'settings.dump', 'LatinCatholicPrayers.png'] 
pathMain = os.path.abspath(__file__)
pathMain = os.path.dirname(pathMain)

f = Freezer(distdir="dist")
f.addScript('LatinCatholicPrayers.py')
f()
for part in listOfFilesAndDirectories:
	pathMainTemp = pathMain
	pathMainTempNew = os.path.join(pathMainTemp, 'dist')
	pathMainTempNew = os.path.join(pathMainTempNew, part)
	pathMainTempOld = os.path.join(pathMainTemp, part)	
	if os.path.isdir(pathMainTempOld) == True:
		shutil.copytree(pathMainTempOld, pathMainTempNew)
	else:
		shutil.copy(pathMainTempOld, pathMainTempNew)
	print 'Old Directory' + '...' + pathMainTempOld
	print 'New Directory' + '...' + pathMainTempNew
